<!DOCTYPE html>
<html>
<head>
	<meta charset="UTF-8">
	<title>添加房源首页</title>
	<link rel="stylesheet" href="css/bootstrap-theme.css" />
	<link rel="stylesheet" href="css/bootstrap.min.css" />
	<link rel="stylesheet" href="css/wxm-addhouse.css" />
	<link rel="stylesheet" href="css/font-awesome.css" />
	<link rel="bookmark" type="image/x-icon" href="img/favicon.ico" />
	<link rel="shortcut icon" href="img/favicon.ico">
	<link rel="icon" href="img/favicon.ico">
	<!-- 尾页 -->
	<link rel="stylesheet" href="css/footer.css">
</head>

<body>
	<div class="container-fluid">
		<!--首行-->
		<div class="row wxm-top">
			<div class="col-md-12">
				<div class="wxm-top-left">
					<svg class="wxm-tubiao" viewBox="0 0 1000 1000" role="presentation" aria-hidden="true" focusable="false" style="height: 1em; width: 1em; display: block; fill: currentcolor; color: #008489;">
						<path d="m499.3 736.7c-51-64-81-120.1-91-168.1-10-39-6-70 11-93 18-27 45-40 80-40s62 13 80 40c17 23 21 54 11 93-11 49-41 105-91 168.1zm362.2 43c-7 47-39 86-83 105-85 37-169.1-22-241.1-102 119.1-149.1 141.1-265.1 90-340.2-30-43-73-64-128.1-64-111 0-172.1 94-148.1 203.1 14 59 51 126.1 110 201.1-37 41-72 70-103 88-24 13-47 21-69 23-101 15-180.1-83-144.1-184.1 5-13 15-37 32-74l1-2c55-120.1 122.1-256.1 199.1-407.2l2-5 22-42c17-31 24-45 51-62 13-8 29-12 47-12 36 0 64 21 76 38 6 9 13 21 22 36l21 41 3 6c77 151.1 144.1 287.1 199.1 407.2l1 1 20 46 12 29c9.2 23.1 11.2 46.1 8.2 70.1zm46-90.1c-7-22-19-48-34-79v-1c-71-151.1-137.1-287.1-200.1-409.2l-4-6c-45-92-77-147.1-170.1-147.1-92 0-131.1 64-171.1 147.1l-3 6c-63 122.1-129.1 258.1-200.1 409.2v2l-21 46c-8 19-12 29-13 32-51 140.1 54 263.1 181.1 263.1 1 0 5 0 10-1h14c66-8 134.1-50 203.1-125.1 69 75 137.1 117.1 203.1 125.1h14c5 1 9 1 10 1 127.1.1 232.1-123 181.1-263.1z"></path>
					</svg>
				</div>
				<div class="wxm-top-right">
					<div class="wxm-topright" id="wxm-touxiang">
						<img src="img/user_pic-50x50.png" />
					</div>
				</div>
			</div>
		</div>
		<!--内容区-->
		<div class="row wxm-center">
			<div class="col-md-10 col-md-offset-1">
				<div class="col-md-7">
					<div class="row">
						<div class="col-md-12">
							<form role="form">
								<h2 id="wxm-toptitle"><span>一起来开始发布您的房源吧。</span></h2><br />
								<div>
									<div class="form-group">
										<span class="wxm-huibaifont">步骤1</span>
										<br />
										<div class="wxm-secondtitle">
											<span>您打算发布什么样的房源？</span>
										</div>
										<div class="col-md-4 wxm-offleftwidth" id="wxm-fangyuan">
											<select id="renttype" class="form-control wxm-inputheight">	
											</select>
										</div>
										<div class="col-md-4 wxm-offleftwidth" id="wxm-fangke">
											<select id="housetype" class="form-control wxm-inputheight"></select>
										</div>
										<div class="col-md-4 wxm-offleftwidth"></div>
									</div>
									<div class="col-md-10 wxm-offleftwidth">
										<button type="button" class="btn btn-success" id="wxm-continue-button">
											<span>继续</span>
										</button>
									</div>
								</div>
							</form>
						</div>
					</div>
				</div>
				<div class="col-md-5" id="wxm-center-right">
					<img src="img/01.png" />
				</div>
			</div>
		</div>
		<div class="col-md-1"></div>
	</div>
	<!-- 网页尾部 -->
	<footer class="wxm-bottom">
		<div class="container">
			<div class="row">
				<ul class="col-md-3 list-unstyled">
					<li class="wjc-footer-title">爱彼迎</li>
					<li>
						<a href="#">工作机会</a>
					</li>
					<li>
						<a href="#">新闻</a>
					</li>
					<li>
						<a href="#">政策</a>
					</li>
					<li>
						<a href="#">帮助</a>
					</li>
					<li>
						<a href="#">多元化与归属感</a>
					</li>
				</ul>
				<ul class="col-md-3 list-unstyled">
					<li class="wjc-footer-title">发现</li>
					<li>
						<a href="#">信任与安全</a>
					</li>
					<li>
						<a href="#">旅行基金</a>
					</li>
					<li>
						<a href="#">爱彼迎公民</a>
					</li>
					<li>
						<a href="#">商务差旅</a>
					</li>
					<li>
						<a href="#">旅游指南</a>
					</li>
					<li>
						<a href="#">爱彼迎杂志</a>
					</li>
					<li>
						<a href="#">活动</a> <span class="wjc-tag">new</span>
					</li>
				</ul>
				<ul class="col-md-3 list-unstyled">
					<li class="wjc-footer-title">出租</li>
					<li>
						<a href="#">为什么要出租？</a>
					</li>
					<li>
						<a href="#">待客之道</a>
					</li>
					<li>
						<a href="#">房东义务</a>
					</li>
					<li>
						<a href="#">开展体验</a> <span class="wjc-tag">new</span>
					</li>
					<li>
						<a href="#">Open Homes</a> <span class="wjc-tag">new</span>
					</li>
				</ul>
				<ul class="col-md-3 list-unstyled">
					<li class="wjc-footer-icon">
						<a href="http://www.weibo.com/airbnb">
							<i class="fa fa-weibo" aria-hidden="true"></i>
						</a>
						&nbsp;&nbsp;&nbsp;&nbsp;
						<a href="#">
							<i class="fa fa-weixin" aria-hidden="true"></i>
						</a>
					</li>
					<li>
						<a href="#">条款</a>
					</li>
					<li>
						<a href="#">隐私政策</a>
					</li>
					<li>
						<a href="#">网站地图</a>
					</li>
				</ul>
			</div>
			<div class="wjc-footer-row">
				<div>
					<div>
						<svg viewBox="0 0 1000 1000" role="presentation" aria-hidden="true" focusable="false" style="height: 1.5em; width: 1.5em; display: block; fill: rgb(118, 118, 118);">
							<path d="m499.3 736.7c-51-64-81-120.1-91-168.1-10-39-6-70 11-93 18-27 45-40 80-40s62 13 80 40c17 23 21 54 11 93-11 49-41 105-91 168.1zm362.2 43c-7 47-39 86-83 105-85 37-169.1-22-241.1-102 119.1-149.1 141.1-265.1 90-340.2-30-43-73-64-128.1-64-111 0-172.1 94-148.1 203.1 14 59 51 126.1 110 201.1-37 41-72 70-103 88-24 13-47 21-69 23-101 15-180.1-83-144.1-184.1 5-13 15-37 32-74l1-2c55-120.1 122.1-256.1 199.1-407.2l2-5 22-42c17-31 24-45 51-62 13-8 29-12 47-12 36 0 64 21 76 38 6 9 13 21 22 36l21 41 3 6c77 151.1 144.1 287.1 199.1 407.2l1 1 20 46 12 29c9.2 23.1 11.2 46.1 8.2 70.1zm46-90.1c-7-22-19-48-34-79v-1c-71-151.1-137.1-287.1-200.1-409.2l-4-6c-45-92-77-147.1-170.1-147.1-92 0-131.1 64-171.1 147.1l-3 6c-63 122.1-129.1 258.1-200.1 409.2v2l-21 46c-8 19-12 29-13 32-51 140.1 54 263.1 181.1 263.1 1 0 5 0 10-1h14c66-8 134.1-50 203.1-125.1 69 75 137.1 117.1 203.1 125.1h14c5 1 9 1 10 1 127.1.1 232.1-123 181.1-263.1z"></path>
						</svg>
					</div>
					<div>
						<div>
							京ICP备16017121号-3 京ICP证 160773号
							<img src="img/public_security_bureau_logo-5d90debd8b3d783447eeffa635df1972.png" alt="网警">
							<a href="http://www.beian.gov.cn/portal/registerSystemInfo?recordcode=11010502032345" target="_blank">
								京公网安备 11010502032345号
							</a>
							安彼迎网络（北京）有限公司
						</div>
						<div>© Airbnb, Inc.</div>
					</div>
				</div>
				<div>
					<div class="btn-group dropup" style="display: inline-block;">
						<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-haspopup="true"
						 aria-expanded="false">
							中文（简体）
						</button>
						<ul class="dropdown-menu">
							<li><a href="#">中文（简体）</a></li>
							<li><a href="#">中文（繁体）</a></li>
							<li><a href="#">日本语</a></li>
							<li><a href="#">English</a></li>
						</ul>
					</div>
					<div class="btn-group dropup" style="display: inline-block;">
						<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-haspopup="true"
						 aria-expanded="false">
							CNY 人民币
						</button>
						<ul class="dropdown-menu">
							<li><a href="#">CNY 人民币</a></li>
							<li><a href="#">HKD 港币</a></li>
							<li><a href="#">JYP日元</a></li>
							<li><a href="#">USD 美元</a></li>
						</ul>
					</div>
				</div>
			</div>
		</div>
	</footer>

	<!-- 尾页js -->
	<script type="text/javascript" src="js/jquery-3.3.1.min.js"></script>
	<script type="text/javascript" src="js/bootstrap.min.js"></script>
	<script src="js/footer.js"></script>
	<script type="text/javascript">
	
	$(document).ready(function (){
		//完成 页面初始化，加载下拉列表数据
		//出租类型
		$.ajax({
			url: "/airbnb/getRentType.do",
			async: false,
		   	type: "POST",
		   	error: function (){
		   		alert("ajax请求失败")
		   	},
		   	success: function(json){
		   		for(var i = 0; i < json.length; i++){
		   			$("#renttype").append("<option value='"+json[i].value+"'>"+json[i].text+"</option>")
		   		}
		   	}
		});
		//房源类型
		$.ajax({
			url: "/airbnb/getHouseType.do",
			async: false,
		   	type: "POST",
		   	error: function (){
		   		alert("ajax请求失败")
		   	},
		   	success: function(json){
		   		for(var i = 0; i < json.length; i++){
		   			$("#housetype").append("<option value='"+json[i].value+"'>"+json[i].text+"</option>")
		   		}
		   	}
		});
		
		//继续按钮的点击事件
		$("#wxm-continue-button").click(function (){
			var renttype = $("#renttype").val();
			var housetype = $("#housetype").val();
			
			$.ajax({
				url: "/airbnb//addHouseStep1.do",
				async: false,
			   	type: "POST",
			   	data: {"rentType":renttype,"houseType":housetype},
			   	error: function (){
			   		alert("数据提交失败")
			   	},
			   	success: function(json){
			   		window.location.href= "step2.html";
			   	}
			});
			
			
		});
		
	});
	
	</script>
</body>

</html>